import request from '@/utils/request'
// 仓库树状图列表
export const GetTreeAPI = params => {
  return request({
    url: '/production/lineWarehouse/list',
    method: 'GET',
    params
  })
}

// 新增仓库
export const AddDataAPI = data => {
  return request({
    url: '/production/lineWarehouse/add',
    method: 'POST',
    data
  })
}

// 修改仓库
export const EditDataAPI = data => {
  return request({
    url: '/production/lineWarehouse/update',
    method: 'POST',
    data
  })
}

// 删除仓库
export const DelDataAPI = data => {
  return request({
    url: '/production/lineWarehouse/delete/' + data,
    method: 'DELETE'
  })
}

// 查看
export const GetDetailsAPI = data => {
  return request({
    url: '/production/lineWarehouse/view/' + data,
    method: 'GET'
  })
}

// 列表
export const GetListAPI = params => {
  return request({
    url: '/production/lineWarehouse/lineList',
    method: 'GET',
    params
  })
}

// 所属车间
export const getWorkshopAPI = params => {
  return request({
    url: 'system/modeling/getWorkshop',
    method: 'GET',
    params
  })
}

// 所属线别
export const getModelingLineAPI = data => {
  return request({
    url: 'system/modeling/getModelingLine/' + data,
    method: 'GET'
  })
}
